<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\farmerhouse\FarmerhouseTravels */

$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => 'Farmerhouse Travels', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>


<section class="wrapper site-min-height">
    <!-- page start-->
    <section class="panel">
        <header class="panel-heading">
              <?= Html::a('返回','javascript:history.back(-1)'); ?>  <?= Html::encode($this->title) ?>
        </header>
        <div class="panel-body">
            <div class="adv-table editable-table ">
                <div class="farmerhouse-travels-view">

                    <p>
                        <?= Html::a('更新', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
                        <?= Html::a('删除', ['delete', 'id' => $model->id], [
                            'class' => 'btn btn-danger',
                            'data' => [
                                'confirm' => '您确定删除此项吗?',
                                'method' => 'post',
                            ],
                        ]) ?>
                    </p>




                    <div class="row">
                        <div class="col-md-8 col-md-offset-2">
                            <div class="row-fluid" style="text-align: center">
                                <div class="span12">
                                    <h3>
                                        <?= $model->title ?>
                                    </h3>
                                </div>
                            </div>
                            <?php foreach ($model->detail as $key => $row) { ?>
                                <div class="row-fluid" style="margin-top: 50px;">
                                    <div class="span12">
                                        <div class="row-fluid">
                                            <div class="span12">
                                                <h3>
                                                    第<?=$row->day ?>天     <span style="font-size: 14px;">(第<?=$row->station ?>站 <small><?=$row->address ?></small>)</span>
                                                </h3>
                                            </div>
                                        </div>

                                        <div class="row-fluid">
                                            <div class="span4">
                                                <?php foreach(\common\components\Upload::checkGetUrl($row->picture,true,'picture') as $k => $r) {?>
                                                    <img alt="140x140" width="100" height="100" src="<?= $r?>" />
                                                <?php } ?>
                                            </div>
                                        </div>

                                    </div>
                                </div>
                                <div class="row-fluid"  style="margin-top: 20px;">
                                    <div class="span12">
                                        <?=$row->content ?>
                                    </div>
                                </div>
                            <?php } ?>
                        </div>
                    </div>






                </div>
            </div>
        </div>
    </section>
</section>